package com.intramirror.product.mapper;

import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface AlgorithmOperationMapper {
    List<Map<String, Object>> getSeason(@Param("categoryType") Long categoryType);

    List<Map<String, Object>> getAllSeason();

    List<Map<String, Object>> getAlgorithm(@Param("categoryType") Long categoryType, @Param("season") String season);

    List<Map<String, Object>> getAlgorithmDiscount(@Param("imPriceAlgorithmId") Long imPriceAlgorithmId);

    List<Map<String, Object>> getAlgorithmBrand(@Param("imPriceAlgorithmId") Long imPriceAlgorithmId);

    List<Map<String, Object>> getUsedBoutiqueRule(@Param("imPriceAlgorithmId") Long imPriceAlgorithmId, @Param("season") String season);

    List<Map<String, Object>> getAlgorithmInfo(@Param("categoryType") Long categoryType, @Param("season") String season, @Param("name") String name);

    List<Map<String,Object>> getPriceChangeRuleCountByCategoryAndSeason(@Param("categoryType") Long categoryType, @Param("season") String season);

    Integer getAlgorithmRunningCount(@Param("imPriceAlgorithmId") Long imPriceAlgorithmId, @Param("season") String season);

    Integer getPriceChangeRuleCountByCategoryAndSeasonCount(@Param("categoryType") Long categoryType, @Param("season") String season);

    Integer getPriceChangeRuleCountByAlgorithmId(@Param("imPriceAlgorithmId") Long imPriceAlgorithmId);

    Long getAlgorithmCountByCategoryAndSeasonAndName(@Param("categoryType") Long categoryType, @Param("season") String season, @Param("name") String name);

    Integer getAlgorithmCountByCategoryAndSeason(@Param("categoryType") Long categoryType, @Param("season") String season);

    Integer getAlgorithmRuleCountByRuleIdAndBrands(@Param("imPriceAlgorithmRuleId") Long imPriceAlgorithmRuleId, @Param("brands") List<String> brands);

    Integer getAlgorithmRuleCountByAlgorithmIdAndBrands(@Param("imPriceAlgorithmId") Long imPriceAlgorithmRuleId, @Param("brands") List<String> brands);

    //    Long deleteImPriceAlgorithmRuleBrandById(@Param("imPriceAlgorithmRuleBrandId") Long imPriceAlgorithmRuleBrandId);

    //    Long updateImPriceDiscountMapping(@Param("imDiscountOff") Long imDiscountOff,@Param("imPriceDiscountMappingId") Long imPriceDiscountMappingId);

    Long deleteImPriceAlgorithmRuleById(@Param("imPriceAlgorithmRuleId") Long imPriceAlgorithmRuleId);

    Long deleteImPriceAlgorithm();

    Long deleteImPriceAlgorithmRuleBrandByRuleId(@Param("imPriceAlgorithmRuleId") Long imPriceAlgorithmRuleId);

    Long deleteImPriceDiscountMappingByRuleId(@Param("imPriceAlgorithmRuleId") Long imPriceAlgorithmRuleId);

    Long deleteImPriceAlgorithmById(@Param("imPriceAlgorithmId") Long imPriceAlgorithmId);

    Long deleteImpriceAlgorithmSeason(@Param("categoryType") Long categoryType, @Param("season") String season);

    Long deleteImpriceAlgorithmRule(@Param("categoryType") Long categoryType, @Param("season") String season);

    Long deleteImPriceAlgorithmRuleByAlgorithmId(@Param("imPriceAlgorithmId") Long imPriceAlgorithmId);

    Long deleteImPriceAlgorithmRuleBrandByAlgorithmId(@Param("imPriceAlgorithmId") Long imPriceAlgorithmId);

    Long deleteImPriceDiscountMappingByAlgorithmId(@Param("imPriceAlgorithmId") Long imPriceAlgorithmId);

    Long initImPriceDiscountMapping(@Param("imPriceAlgorithmRuleId") Long imPriceAlgorithmRuleId);

    Long updateSaveAtByRuleId(@Param("imPriceAlgorithmRuleId") Long imPriceAlgorithmRuleId);

    Long updateSaveAtById(@Param("imPriceAlgorithmId") Long imPriceAlgorithmId);

    Long updatePriceChangeRuleImPriceAlgorithm(@Param("newImPriceAlgorithmId") Long newImPriceAlgorithmId,@Param("oldImPriceAlgorithmId") Long oldImPriceAlgorithmId);

    List<Map<String, Object>> getBrand(@Param("brandName") String brandName);

    List<Long> getBurstingProductIds();

    Integer getBurstingUpdateCount(@Param("lastTime")String lastTime);

    Integer updateImPriceAlgorithmRuleUpdatedById(@Param("imPriceAlgorithmRuleId")Long imPriceAlgorithmRuleId);

    List<Long> selectProduct();

    List<Long> selectProduct2();

    List<Long> selectCarryOver();


}
